package com.student.model;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * EmployCompany entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Employ_Company", schema = "dbo", catalog = "StudentManager")
public class EmployCompany implements java.io.Serializable {

	// Fields

	private Long companyId;
	private Area area;
	private String loginId;
	private String password;
	private String companyName;
	private String companyEnglishName;
	private String companyAddress;
	private String companyScale;
	private String companyContact;
	private String companyFinance;
	private String companyWebsite;
	private String fax;
	private String email;
	private Timestamp foundTime;
	private String businessLicense;
	private Short audit;
	private String discussion;
	private Timestamp registerTime;
	private String remark;
	private String companyIntroduction;
	private Set<ReplyLetter> replyLetters = new HashSet<ReplyLetter>(0);
	private Set<AuditionNotice> auditionNotices = new HashSet<AuditionNotice>(0);
	private Set<EmployMessage> employMessages = new HashSet<EmployMessage>(0);
	private Set<FromLetter> fromLetters = new HashSet<FromLetter>(0);

	// Constructors

	/** default constructor */
	public EmployCompany() {
	}

	/** minimal constructor */
	public EmployCompany(Long companyId) {
		this.companyId = companyId;
	}

	/** full constructor */
	public EmployCompany(Long companyId, Area area, String loginId,
			String password, String companyName, String companyEnglishName,
			String companyAddress, String companyScale, String companyContact,
			String companyFinance, String companyWebsite, String fax,
			String email, Timestamp foundTime, String businessLicense,
			Short audit, String discussion, Timestamp registerTime,
			String remark, String companyIntroduction,
			Set<ReplyLetter> replyLetters, Set<AuditionNotice> auditionNotices,
			Set<EmployMessage> employMessages, Set<FromLetter> fromLetters) {
		this.companyId = companyId;
		this.area = area;
		this.loginId = loginId;
		this.password = password;
		this.companyName = companyName;
		this.companyEnglishName = companyEnglishName;
		this.companyAddress = companyAddress;
		this.companyScale = companyScale;
		this.companyContact = companyContact;
		this.companyFinance = companyFinance;
		this.companyWebsite = companyWebsite;
		this.fax = fax;
		this.email = email;
		this.foundTime = foundTime;
		this.businessLicense = businessLicense;
		this.audit = audit;
		this.discussion = discussion;
		this.registerTime = registerTime;
		this.remark = remark;
		this.companyIntroduction = companyIntroduction;
		this.replyLetters = replyLetters;
		this.auditionNotices = auditionNotices;
		this.employMessages = employMessages;
		this.fromLetters = fromLetters;
	}

	// Property accessors
	@Id
	@Column(name = "Company_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getCompanyId() {
		return this.companyId;
	}

	public void setCompanyId(Long companyId) {
		this.companyId = companyId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Area_id")
	public Area getArea() {
		return this.area;
	}

	public void setArea(Area area) {
		this.area = area;
	}

	@Column(name = "Login_id", length = 50)
	public String getLoginId() {
		return this.loginId;
	}

	public void setLoginId(String loginId) {
		this.loginId = loginId;
	}

	@Column(name = "Password", length = 20)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "Company_Name", length = 50)
	public String getCompanyName() {
		return this.companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	@Column(name = "Company_English_Name", length = 200)
	public String getCompanyEnglishName() {
		return this.companyEnglishName;
	}

	public void setCompanyEnglishName(String companyEnglishName) {
		this.companyEnglishName = companyEnglishName;
	}

	@Column(name = "Company_Address", length = 500)
	public String getCompanyAddress() {
		return this.companyAddress;
	}

	public void setCompanyAddress(String companyAddress) {
		this.companyAddress = companyAddress;
	}

	@Column(name = "Company_Scale", length = 50)
	public String getCompanyScale() {
		return this.companyScale;
	}

	public void setCompanyScale(String companyScale) {
		this.companyScale = companyScale;
	}

	@Column(name = "Company_Contact", length = 50)
	public String getCompanyContact() {
		return this.companyContact;
	}

	public void setCompanyContact(String companyContact) {
		this.companyContact = companyContact;
	}

	@Column(name = "Company_Finance", length = 50)
	public String getCompanyFinance() {
		return this.companyFinance;
	}

	public void setCompanyFinance(String companyFinance) {
		this.companyFinance = companyFinance;
	}

	@Column(name = "Company_Website", length = 200)
	public String getCompanyWebsite() {
		return this.companyWebsite;
	}

	public void setCompanyWebsite(String companyWebsite) {
		this.companyWebsite = companyWebsite;
	}

	@Column(name = "Fax", length = 50)
	public String getFax() {
		return this.fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	@Column(name = "Email", length = 50)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "Found_Time", length = 23)
	public Timestamp getFoundTime() {
		return this.foundTime;
	}

	public void setFoundTime(Timestamp foundTime) {
		this.foundTime = foundTime;
	}

	@Column(name = "Business_license", length = 1024)
	public String getBusinessLicense() {
		return this.businessLicense;
	}

	public void setBusinessLicense(String businessLicense) {
		this.businessLicense = businessLicense;
	}

	@Column(name = "Audit")
	public Short getAudit() {
		return this.audit;
	}

	public void setAudit(Short audit) {
		this.audit = audit;
	}

	@Column(name = "Discussion")
	public String getDiscussion() {
		return this.discussion;
	}

	public void setDiscussion(String discussion) {
		this.discussion = discussion;
	}

	@Column(name = "Register_Time", length = 23)
	public Timestamp getRegisterTime() {
		return this.registerTime;
	}

	public void setRegisterTime(Timestamp registerTime) {
		this.registerTime = registerTime;
	}

	@Column(name = "Remark")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "Company_Introduction")
	public String getCompanyIntroduction() {
		return this.companyIntroduction;
	}

	public void setCompanyIntroduction(String companyIntroduction) {
		this.companyIntroduction = companyIntroduction;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "employCompany")
	public Set<ReplyLetter> getReplyLetters() {
		return this.replyLetters;
	}

	public void setReplyLetters(Set<ReplyLetter> replyLetters) {
		this.replyLetters = replyLetters;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "employCompany")
	public Set<AuditionNotice> getAuditionNotices() {
		return this.auditionNotices;
	}

	public void setAuditionNotices(Set<AuditionNotice> auditionNotices) {
		this.auditionNotices = auditionNotices;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "employCompany")
	public Set<EmployMessage> getEmployMessages() {
		return this.employMessages;
	}

	public void setEmployMessages(Set<EmployMessage> employMessages) {
		this.employMessages = employMessages;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "employCompany")
	public Set<FromLetter> getFromLetters() {
		return this.fromLetters;
	}

	public void setFromLetters(Set<FromLetter> fromLetters) {
		this.fromLetters = fromLetters;
	}

}